package main

import (
	"fmt"
	"reflect"
)

func main() {
	var a int = 1024
	valueOfA := reflect.ValueOf(&a)

	valueOfA.Elem().SetInt(1)
	fmt.Println(a)

	type dog struct {
		LegCount int
	}
	valueOfDog := reflect.ValueOf(&dog{})
	valueOfDog = valueOfDog.Elem()
	vLegCount := valueOfDog.FieldByName("LegCount")
	vLegCount.SetInt(6)
	fmt.Println(vLegCount.Int())


}
